using Microsoft.Extensions.DependencyInjection;
using Project.Domain;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;

namespace Project.EntityFrameworkCore {
    [DependsOn (
        //typeof(ProjectDomainModule),
        typeof (AbpEntityFrameworkCoreModule)
    )]
    public class ProjectEntityFrameworkCoreModule : AbpModule {
        public override void ConfigureServices (ServiceConfigurationContext context) {
            context.Services.AddAbpDbContext<ProjectDbContext> (o => {
                o.AddDefaultRepositories (true);
            });

            context.Services.Configure<AbpDbContextOptions>(o =>
            {
                o.UseMySQL();
            });

            //Configure<AbpDbContextOptions> (o => {
            //    o.UseMySQL ();
            //});
        }
    }
}